package com.woniuxy.store.core.mapper;

import com.woniuxy.store.core.model.MdStorefirst;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.store.core.model.MdStoresecond;
import com.woniuxy.store.core.vo.MdStorefirstVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2021-06-29
 */
public interface MdStorefirstMapper extends BaseMapper<MdStorefirst> {
    List<MdStorefirst> getFirst(int storeId);

    @Update("UPDATE `md_storefirst` SET `flag`=1 WHERE `first_id`=#{firstId}")
    void delectOne(int firstId);

    @Select("select * from md_storesecond where first_id=#{firstId}")
    List<MdStoresecond> abc(Integer firstId);

    @Delete("delete from md_storefirst where first_id=#{firstId}")
    void deleteServe(int firstId);

    @Select("select * from md_storefirst")
    List<MdStorefirst> selectAll();
}
